package com.tedu.bill.demo3;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.Scanner;

/**
 * Author：毕龙
 * Date: 2024/5/26 16:52
 */
public class TestWriter {
    public static void main(String[] args) throws IOException {
        Writer writer = new FileWriter("day14/src/long.txt");

        Scanner sc = new Scanner(System.in);
        while (true){
            String message = sc.next();
            writer.write(message.substring(0,message.length()-1)+"\n");

            if(message.charAt(message.length()-1)== '0'){
                writer.close();
                System.exit(0);
            }
        }
    }
}
